<div class="module-setting">
    <ol class="breadcrumb">
        <li>运营系统</li>
        <li>交易挂单控制</li>
    </ol>

    <div class="ui-box">
        <div class="form-container">
            <div class="body-title">说明：开关关闭后该交易对停止挂单</div>
            <table class="table table-striped table-hover">
                <thead>
                <tr>
                    <th width="30%">交易对</th>
                    <th width="30%">状态</th>
                    <th width="40%">操作</th>
                </tr>
                </thead>
                <tbody>
                <tr ng-repeat="item in vm.list" ng-if="vm.isLoading === false && vm.list.length > 0">
                    <td>{{item.symbol}}</td>
                    <td>
                        <span ng-if="item.status === vm.STATUS_NOT_OPEN">未开启</span>
                        <span ng-if="item.status === vm.STATUS_HAS_OPEN">已开启</span>
                        <span ng-if="item.status === vm.STATUS_CLOSED">已下线</span>
                    </td>
                    <td>
                        <div class="status-box" ng-if="item.status === vm.STATUS_NOT_OPEN">
                            <a href="javascript:;"
                               ng-click="vm.update(item.symbol, vm.STATUS_HAS_OPEN, '开启')"
                               class="btn btn-success">开启</a>
                            <a href="javascript:;"
                               disabled
                               ng-click="vm.update(item.symbol, vm.STATUS_NOT_OPEN, '关闭')"
                               class="btn btn-default">关闭</a>
                            <a href="javascript:;"
                               disabled
                               ng-click="vm.update(item.symbol, vm.STATUS_CLOSED, '下线')"
                               class="btn btn-danger">下线</a>
                        </div>
                        <div class="status-box" ng-if="item.status === vm.STATUS_HAS_OPEN">
                            <a href="javascript:;"
                               disabled
                               ng-click="vm.update(item.symbol, vm.STATUS_HAS_OPEN, '开启')"
                               class="btn btn-success">开启</a>
                            <a href="javascript:;"
                               ng-click="vm.update(item.symbol, vm.STATUS_NOT_OPEN, '关闭')"
                               class="btn btn-default">关闭</a>
                            <a href="javascript:;"
                               ng-click="vm.update(item.symbol, vm.STATUS_CLOSED, '下线')"
                               class="btn btn-danger">下线</a>
                        </div>
                        <div class="status-box" ng-if="item.status === vm.STATUS_CLOSED">
                            <a href="javascript:;"
                               disabled
                               ng-click="vm.update(item.symbol, vm.STATUS_HAS_OPEN, '开启')"
                               class="btn btn-success">开启</a>
                            <a href="javascript:;"
                               ng-click="vm.update(item.symbol, vm.STATUS_NOT_OPEN, '关闭')"
                               disabled
                               class="btn btn-default">关闭</a>
                            <a href="javascript:;"
                               ng-click="vm.update(item.symbol, vm.STATUS_HAS_OPEN, '上线')"
                               class="btn btn-warning">上线</a>
                        </div>
                    </td>
                </tr>
                <tr class="ui-no-data" ng-if="vm.isLoading === false && (vm.list.length === 0||vm.list===null)">
                    <td colspan="3">暂无数据</td>
                </tr>
                <tr class="ui-loading" ng-if="vm.isLoading === true">
                    <td colspan="3">正在加载，请稍候...</td>
                </tr>
                </tbody>
            </table>


        </div>
    </div>


</div>
